#
#  Angles.py
#  Peteship
#
#  Created by Pete Lord on 05/03/2009.
#
#  Mod by Ben Davis. Epic.

class Angle(int):
   # modified int that stores values between 0 and 8, used for 8 directional sprites et al.
   def __new__(self, amount):
       return int.__new__(self, amount % 8)
       
   def __add__(self, other):
       return Angle(int.__add__(self, other) % 8)
       
   def __sub__(self, other):
       return Angle(int.__sub__(self, other) % 8)